home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d12
/
cbibcode.arc
/
POW10.C
< prev
next >
Encoding:
Amiga
Atari
Commodore
DOS
FM Towns/JPY
Macintosh
Macintosh JP
Macintosh to JP
NeXTSTEP
RISC OS/Acorn
Shift JIS
UTF-8
Wrap
C/C++ Source or Header
|
1991-08-05
|
300 b
|
16 lines
/* pow10.c from page 235*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
main(int argc, char **argv)
{
int p;
if(argc < 2)
{
printf("usage: %s <integer_power>\n", argv[0]);
exit(1);
}
p = atoi(argv[1]);
printf("10 to the power %d = %f\n" , p, pow10(p));
}